-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace .sr-only with .visually-hidden, use static Helper.screenReaderOnly class where applicable, fix SpinnerAjax(Button|Link) label rendering #1010
Conversation
0a52cd8
to
b1e3d40
Compare
If I remember correctly, in BS5, |
Right, I've missed that. I've slightly enlarged scope of this PR, replacing |
...rc/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/components/progress/Stack.java
Outdated
Show resolved
Hide resolved
...rc/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/components/progress/Stack.java
Outdated
Show resolved
Hide resolved
All done |
Thank you, @vrozkovec ! |
Should we backport it to wicket-9.x-bootstrap-5.x ? |
yes, please :) |
…rOnly class where applicable, fix SpinnerAjax(Button|Link) label rendering (#1010) * Only add class .sr-only when the label is empty - check in onConfigure * Update helper class name for screenReaderOnly content * Replace .sr-only -> .visually-hidden, use static Helper where applicable * rename all references from "srOnly" to "visuallyHidden" for consistency (cherry picked from commit a0c58cf)
Done! |
In current implementation, just calling
setLabel()
triggersAttributeModifier
that adds.sr-only
even though the label's model may not be empty and in some setups label is not rendered because.sr-only
class hides it.With this change, the check is made in
onConfigure
, but not very niceget("label")
call is used - better way would requireBootstrapAjaxLink
andBootstrapAjaxButton
methods that return label to beprotected
instead ofprivate
. Or extracting label's id to the constant and making protected that.